﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace PlayerTest.CustomControls
{
    /// <summary>
    /// ScriptItem.xaml에 대한 상호 작용 논리
    /// </summary>
    public partial class WordItem : UserControl
    {
        private double position;
        private string word;

        public double Position
        {
            get { return position; }
            set { position = value; }
        }
        public string Word
        {
            get { return word; }
            set
            {
                word = value;
                WordText.Content = word;
            }
        }

        private static string TextTime(double time)
        {
            int pos = (int)time;
            int hour = pos / 3600;
            int minute = pos / 60;
            int sec = pos % 60;

            return string.Format("{0}:{1}:{2}", hour.ToString("D2"), minute.ToString("D2"), sec.ToString("D2"));
        }

        public WordItem()
        {
            InitializeComponent();
        }

        private void Word_Play(object sender, RoutedEventArgs e)
        {
            MessageBox.Show(string.Format("{0}", word));
        }
    }
}
